/* 爬虫管理页面样式 */

/* 页面容器 */
.crawler-manager {
  padding: 24px;
  min-height: 100vh;
}

/* 页面头部 */
.crawler-header {
  margin-bottom: 24px;
}

.crawler-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
}

.crawler-subtitle {
  margin: 0;
  font-size: 14px;
}

/* 统计卡片 */
.crawler-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.crawler-stat-card {
  padding: 16px;
}

.crawler-stat-content {
  display: flex;
  align-items: center;
}

.crawler-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.crawler-stat-text {
  margin: 0;
  font-size: 14px;
}

.crawler-stat-value {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* 主要内容区域 */
.crawler-main-content {
  margin-top: 24px;
}

.crawler-card {
  padding: 24px;
}

/* 标签页导航 */
.crawler-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid;
}

.crawler-tab-buttons {
  display: flex;
  gap: 16px;
}

.crawler-search-container {
  display: flex;
  gap: 12px;
}

.crawler-search-input {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid;
  font-family: inherit;
  width: 200px;
}

.crawler-action-buttons {
  display: flex;
  gap: 12px;
}

/* 批量操作栏 */
.crawler-batch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid;
}

/* 空状态 */
.crawler-empty-state {
  text-align: center;
  padding: 40px;
}

.crawler-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

/* 表格样式 */
.crawler-table-header {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
}

.crawler-table-row {
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid;
}

.crawler-table-cell {
  display: flex;
  align-items: center;
}

.crawler-table-cell-checkbox {
  width: 40px;
  text-align: center;
}

.crawler-table-cell-name {
  flex: 1;
}

.crawler-table-cell-status {
  width: 120px;
}

.crawler-table-cell-progress {
  width: 100px;
}

.crawler-table-cell-count {
  width: 120px;
}

.crawler-table-cell-actions {
  width: 120px;
  display: flex;
  gap: 8px;
}

.crawler-table-cell-urls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* 任务详情 */
.crawler-job-name {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.crawler-job-url {
  margin: 0;
  word-break: break-all;
  font-size: 14px;
}

/* 模态框 */
.crawler-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.crawler-modal-content {
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.crawler-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crawler-modal-title {
  margin: 0;
  font-size: 20px;
}

.crawler-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.crawler-modal-body {
  padding: 24px;
}

.crawler-form-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.crawler-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crawler-form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.crawler-form-input {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid;
  font-family: inherit;
  width: 100%;
}

.crawler-url-field {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.crawler-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.crawler-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crawler-toggle-switch {
  width: 40px;
  height: 20px;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.crawler-toggle-handle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  transition: all 0.3s;
}

.crawler-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* 日志模态框 */
.crawler-log-modal {
  max-width: 800px;
}

.crawler-log-content {
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 16px;
  border-radius: 6px;
  margin: 16px 0;
}

.crawler-log-entry {
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 4px;
}

.crawler-log-entry.info {
  background-color: rgba(24, 144, 255, 0.1);
}

.crawler-log-entry.success {
  background-color: rgba(82, 196, 26, 0.1);
}

.crawler-log-entry.warning {
  background-color: rgba(250, 173, 20, 0.1);
}

.crawler-log-entry.error {
  background-color: rgba(255, 77, 79, 0.1);
}

/* 调度配置 */
.crawler-schedule-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .crawler-manager {
    padding: 16px;
  }
  
  .crawler-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .crawler-tab-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .crawler-search-container {
    width: 100%;
  }
  
  .crawler-search-input {
    width: 100%;
  }
  
  .crawler-table-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .crawler-table-cell {
    width: 100%;
  }
  
  .crawler-table-cell-checkbox {
    width: 100%;
    text-align: left;
  }
  
  .crawler-table-cell-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .crawler-modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .crawler-form-grid {
    grid-template-columns: 1fr;
  }
  
  .crawler-schedule-config {
    grid-template-columns: 1fr;
  }
}